package com.rdr.randDinnner.controller;

import com.rdr.randDinnner.service.DbServiceIml;
import com.rdr.randDinnner.utils.ApplicationContextUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RandDinnerController {

    @Autowired
    private DbServiceIml dbServiceIml;

    @GetMapping("/api")
    public String api() {
        DbServiceIml dbServiceIml = new DbServiceIml();
        ApplicationContextUtils.autowire(dbServiceIml);
        return dbServiceIml.tt();
    }

    @GetMapping("/api1")
    public String api1() {
        boolean flag = true;
        if (flag) {
            System.out.println();
        }
        return dbServiceIml.tt();
    }

}
